package com.qhhc.hospital.service.impl;

import com.qhhc.hospital.entity.AdminUser;
import com.qhhc.hospital.mapper.AdminUserMapper;
import com.qhhc.hospital.service.IAdminUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminUserService implements IAdminUserService {
    @Autowired
    AdminUserMapper adminUserMapper;
    
    @Override
    public int insert(AdminUser adminUser) {
        int count = adminUserMapper.insertAdminUser(adminUser);
        return count;
    }
    
    @Override
    public List<AdminUser> selectAll() {
        List<AdminUser> adminUsers = adminUserMapper.selectAllAdminUsers();
        return adminUsers;
    }
    
    @Override
    public AdminUser selectById(Integer aId) {
        AdminUser adminUser = adminUserMapper.selectAdminUserById(aId);
        return adminUser;
    }
    
    @Override
    public int update(AdminUser adminUser) {
        return adminUserMapper.updateAdminUser(adminUser);
    }
    
    @Override
    public int delete(Integer aId) {
        return adminUserMapper.deleteAdminUser(aId);
    }
} 